package threading;

import com.sun.scenario.effect.impl.sw.sse.SSEBlend_SRC_OUTPeer;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Microsoft
 * Date: 2023-07-15
 * Time: 20:40
 */
public class ThreadDemo24 {
    public static void main(String[] args) {
        ExecutorService pool = Executors.newFixedThreadPool(10);//我们并非直接new ExecutorService对象，而是通过Executors类中的静态方法，完成的对象构造

        //添加任务到线程池
        pool.submit(new Runnable() {
            @Override
            public void run() {
                System.out.println("hello");
            }
        });

        System.out.println();
    }
}












